@(id: Long, usuarioForm: Form[Usuario])

@import helper._

@implicitFieldConstructor = @{ FieldConstructor(twitterBootstrapInput.render) } 

@main {
    
    <h1>Editar Usuário</h1>
    
    @form(routes.Usuarios.update(id)) {
        
        <fieldset>
            @inputText(usuarioForm("matricula"), '_label -> "Matrícula")
            
            @inputText(usuarioForm("nome"), '_label -> "Nome")
            
            
           @select(
                usuarioForm("perfil"), 
                options = options(util.PerfilUsuario.options()),
                '_default -> "--- Escolha um perfil ---",
                '_label -> "Perfil",
                '_error -> usuarioForm("perfil").error.map(_.withMessage("Please select your perfil"))
            )
            
            @inputText(usuarioForm("email"), '_label -> "Email",
                '_help -> "Enter a valid email address.")
            
            @inputText(usuarioForm("usuario"), '_label -> "Descricao")
            
            @inputPassword(
                usuarioForm("senha"), 
                '_label -> "Senha",
                '_help -> "A password must be at least 6 characters. "
            )
            
            @inputPassword(
                usuarioForm("confirmaSenha"), 
                '_label -> "Confirme a senha",
                '_help -> "Please repeat your password again.",
                '_error -> usuarioForm.error("password")
            )
        </fieldset>
        
        <div class="actions">
            <input type="submit" value="Salvar" class="btn primary"> ou 
            <a href="@routes.Usuarios.list()" class="btn">Cancelar</a> 
         </div> 
    }
    
    
    @form(routes.Usuarios.delete(id), 'class -> "topRight") {
   		
        <input type="submit" value="Remover" class="btn danger">
         
    }
  
    
}
